3.915 \(\int \frac{(A+B x) \sqrt{a+b x+c x^2}}{x} \, dx\)

Optimal. Leaf size=129 \[ -\frac{\left (-4 a B c-4 A b c+b^2 B\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{8 c^{3/2}}+\frac{\sqrt{a+b x+c x^2} (4 A c+b B+2 B c x)}{4 c}-\sqrt{a} A \tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right ) \]

[Out]

((b*B + 4*A*c + 2*B*c*x)*Sqrt[a + b*x + c*x^2])/(4*c) - Sqrt[a]*A*ArcTanh[(2*a +
 b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])] - ((b^2*B - 4*A*b*c - 4*a*B*c)*ArcTanh[
(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(8*c^(3/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.282206, antiderivative size = 129, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217 \[ -\frac{\left (-4 a B c-4 A b c+b^2 B\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{8 c^{3/2}}+\frac{\sqrt{a+b x+c x^2} (4 A c+b B+2 B c x)}{4 c}-\sqrt{a} A \tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right ) \]

Antiderivative was successfully verified.

[In]  Int[((A + B*x)*Sqrt[a + b*x + c*x^2])/x,x]

[Out]

((b*B + 4*A*c + 2*B*c*x)*Sqrt[a + b*x + c*x^2])/(4*c) - Sqrt[a]*A*ArcTanh[(2*a +
 b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])] - ((b^2*B - 4*A*b*c - 4*a*B*c)*ArcTanh[
(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(8*c^(3/2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 32.5262, size = 121, normalized size = 0.94 \[ - A \sqrt{a} \operatorname{atanh}{\left (\frac{2 a + b x}{2 \sqrt{a} \sqrt{a + b x + c x^{2}}} \right )} + \frac{\sqrt{a + b x + c x^{2}} \left (2 A c + \frac{B b}{2} + B c x\right )}{2 c} - \frac{\left (- 4 A b c - 4 B a c + B b^{2}\right ) \operatorname{atanh}{\left (\frac{b + 2 c x}{2 \sqrt{c} \sqrt{a + b x + c x^{2}}} \right )}}{8 c^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(c*x**2+b*x+a)**(1/2)/x,x)

[Out]

-A*sqrt(a)*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x**2))) + sqrt(a + b*x
+ c*x**2)*(2*A*c + B*b/2 + B*c*x)/(2*c) - (-4*A*b*c - 4*B*a*c + B*b**2)*atanh((b
 + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x**2)))/(8*c**(3/2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.295756, size = 132, normalized size = 1.02 \[ \frac{\left (4 a B c+4 A b c+b^2 (-B)\right ) \log \left (2 \sqrt{c} \sqrt{a+x (b+c x)}+b+2 c x\right )}{8 c^{3/2}}+\frac{\sqrt{a+x (b+c x)} (4 A c+b B+2 B c x)}{4 c}-\sqrt{a} A \log \left (2 \sqrt{a} \sqrt{a+x (b+c x)}+2 a+b x\right )+\sqrt{a} A \log (x) \]

Antiderivative was successfully verified.

[In]  Integrate[((A + B*x)*Sqrt[a + b*x + c*x^2])/x,x]

[Out]

((b*B + 4*A*c + 2*B*c*x)*Sqrt[a + x*(b + c*x)])/(4*c) + Sqrt[a]*A*Log[x] - Sqrt[
a]*A*Log[2*a + b*x + 2*Sqrt[a]*Sqrt[a + x*(b + c*x)]] + ((-(b^2*B) + 4*A*b*c + 4
*a*B*c)*Log[b + 2*c*x + 2*Sqrt[c]*Sqrt[a + x*(b + c*x)]])/(8*c^(3/2))

_______________________________________________________________________________________

Maple [A]  time = 0.011, size = 184, normalized size = 1.4 \[{\frac{Bx}{2}\sqrt{c{x}^{2}+bx+a}}+{\frac{Bb}{4\,c}\sqrt{c{x}^{2}+bx+a}}+{\frac{Ba}{2}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){\frac{1}{\sqrt{c}}}}-{\frac{{b}^{2}B}{8}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){c}^{-{\frac{3}{2}}}}+A\sqrt{c{x}^{2}+bx+a}+{\frac{Ab}{2}\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){\frac{1}{\sqrt{c}}}}-A\sqrt{a}\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(c*x^2+b*x+a)^(1/2)/x,x)

[Out]

1/2*B*x*(c*x^2+b*x+a)^(1/2)+1/4*B/c*(c*x^2+b*x+a)^(1/2)*b+1/2*B/c^(1/2)*ln((1/2*
b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))*a-1/8*B/c^(3/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^
2+b*x+a)^(1/2))*b^2+A*(c*x^2+b*x+a)^(1/2)+1/2*A*b*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+
b*x+a)^(1/2))/c^(1/2)-A*a^(1/2)*ln((2*a+b*x+2*a^(1/2)*(c*x^2+b*x+a)^(1/2))/x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)*(B*x + A)/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 1.06566, size = 1, normalized size = 0.01 \[ \left [\frac{8 \, A \sqrt{a} c^{\frac{3}{2}} \log \left (-\frac{8 \, a b x +{\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt{c x^{2} + b x + a}{\left (b x + 2 \, a\right )} \sqrt{a} + 8 \, a^{2}}{x^{2}}\right ) + 4 \,{\left (2 \, B c x + B b + 4 \, A c\right )} \sqrt{c x^{2} + b x + a} \sqrt{c} -{\left (B b^{2} - 4 \,{\left (B a + A b\right )} c\right )} \log \left (-4 \,{\left (2 \, c^{2} x + b c\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, c^{2} x^{2} + 8 \, b c x + b^{2} + 4 \, a c\right )} \sqrt{c}\right )}{16 \, c^{\frac{3}{2}}}, \frac{4 \, A \sqrt{a} \sqrt{-c} c \log \left (-\frac{8 \, a b x +{\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt{c x^{2} + b x + a}{\left (b x + 2 \, a\right )} \sqrt{a} + 8 \, a^{2}}{x^{2}}\right ) + 2 \,{\left (2 \, B c x + B b + 4 \, A c\right )} \sqrt{c x^{2} + b x + a} \sqrt{-c} -{\left (B b^{2} - 4 \,{\left (B a + A b\right )} c\right )} \arctan \left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, \sqrt{c x^{2} + b x + a} c}\right )}{8 \, \sqrt{-c} c}, -\frac{16 \, A \sqrt{-a} c^{\frac{3}{2}} \arctan \left (\frac{b x + 2 \, a}{2 \, \sqrt{c x^{2} + b x + a} \sqrt{-a}}\right ) - 4 \,{\left (2 \, B c x + B b + 4 \, A c\right )} \sqrt{c x^{2} + b x + a} \sqrt{c} +{\left (B b^{2} - 4 \,{\left (B a + A b\right )} c\right )} \log \left (-4 \,{\left (2 \, c^{2} x + b c\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, c^{2} x^{2} + 8 \, b c x + b^{2} + 4 \, a c\right )} \sqrt{c}\right )}{16 \, c^{\frac{3}{2}}}, -\frac{8 \, A \sqrt{-a} \sqrt{-c} c \arctan \left (\frac{b x + 2 \, a}{2 \, \sqrt{c x^{2} + b x + a} \sqrt{-a}}\right ) - 2 \,{\left (2 \, B c x + B b + 4 \, A c\right )} \sqrt{c x^{2} + b x + a} \sqrt{-c} +{\left (B b^{2} - 4 \,{\left (B a + A b\right )} c\right )} \arctan \left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, \sqrt{c x^{2} + b x + a} c}\right )}{8 \, \sqrt{-c} c}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)*(B*x + A)/x,x, algorithm="fricas")

[Out]

[1/16*(8*A*sqrt(a)*c^(3/2)*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*
x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2)/x^2) + 4*(2*B*c*x + B*b + 4*A*c)*sqrt(c*x^2
+ b*x + a)*sqrt(c) - (B*b^2 - 4*(B*a + A*b)*c)*log(-4*(2*c^2*x + b*c)*sqrt(c*x^2
 + b*x + a) - (8*c^2*x^2 + 8*b*c*x + b^2 + 4*a*c)*sqrt(c)))/c^(3/2), 1/8*(4*A*sq
rt(a)*sqrt(-c)*c*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b*
x + 2*a)*sqrt(a) + 8*a^2)/x^2) + 2*(2*B*c*x + B*b + 4*A*c)*sqrt(c*x^2 + b*x + a)
*sqrt(-c) - (B*b^2 - 4*(B*a + A*b)*c)*arctan(1/2*(2*c*x + b)*sqrt(-c)/(sqrt(c*x^
2 + b*x + a)*c)))/(sqrt(-c)*c), -1/16*(16*A*sqrt(-a)*c^(3/2)*arctan(1/2*(b*x + 2
*a)/(sqrt(c*x^2 + b*x + a)*sqrt(-a))) - 4*(2*B*c*x + B*b + 4*A*c)*sqrt(c*x^2 + b
*x + a)*sqrt(c) + (B*b^2 - 4*(B*a + A*b)*c)*log(-4*(2*c^2*x + b*c)*sqrt(c*x^2 +
b*x + a) - (8*c^2*x^2 + 8*b*c*x + b^2 + 4*a*c)*sqrt(c)))/c^(3/2), -1/8*(8*A*sqrt
(-a)*sqrt(-c)*c*arctan(1/2*(b*x + 2*a)/(sqrt(c*x^2 + b*x + a)*sqrt(-a))) - 2*(2*
B*c*x + B*b + 4*A*c)*sqrt(c*x^2 + b*x + a)*sqrt(-c) + (B*b^2 - 4*(B*a + A*b)*c)*
arctan(1/2*(2*c*x + b)*sqrt(-c)/(sqrt(c*x^2 + b*x + a)*c)))/(sqrt(-c)*c)]

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (A + B x\right ) \sqrt{a + b x + c x^{2}}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(c*x**2+b*x+a)**(1/2)/x,x)

[Out]

Integral((A + B*x)*sqrt(a + b*x + c*x**2)/x, x)

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)*(B*x + A)/x,x, algorithm="giac")

[Out]

Exception raised: TypeError